//  process.env.NODE_ENV 的取值范围： 'testing' | 'production' | 'development'







// payMethodMap ：支付类信息
const payMethodMap = {
    getMethodForType: function (payType) {
  
      let propInfo = this.findProperty(function (propValue, propkey, index) {
  
        switch (typeof propValue) {
          case "object" : {
            return payType == propValue.type;
          }
  
          default :
            return false;
        }
  
  
      });
  
      return propInfo.value;
    },
    weChatWeb: {
      type: 7,
      name: "微信",
      icon: require(':assets/icon/ic_wechat.png'),
      orderNo: 1,
      selected: true
    },  //微信Web支付
    weChatPublic: {
      type: 5,
      name: "微信",
      icon: require(':assets/icon/ic_wechat.png'),
      orderNo: 2
    },  //微信公共号支付
    alipay: {
      type: 6,
      name: "支付宝",
      icon: require(':assets/icon/ic_alipay.png'),
      orderNo: 3
    },   //支付宝
  };
  
  
  //功能模块位置流信息
  let funLocatFlows = {
  
  
    DRGH: {
      name: "当日挂号",
      to: {
        name: "DepartmentList",
        query: {
          routeName: "curRegister",
          bookType: 1,
          funKey: 'DRGH',
          title: '选择科室',
          hideBack: false,
          to: {
            name: "DoctorList",
            query: {
              bookType: 1,
              funKey: "DRGH",
              title: "医生列表",
              isFirstPatient: false,
              to: {
                name: "DoctorInfo"
              }
            }
          }
        }
      }
    },
  
  
    YYGH: {
      name: "预约挂号",
      to: {
        name: "DepartmentList",
        query: {
          routeName: "bookingRegister",
          bookType: 0,
          funKey: 'YYGH',
          title: '选择科室',
          hideBack: false,
          to: {
            name: "DoctorList",
            query: {
              bookType: 0,
              funKey: "YYGH",
              title: "医生列表",
              isFirstPatient: false,
              to: {
                name: "DoctorInfo"
              }
            }
          }
        },
      }
    },
  
  
    MZCZ: {
      name: "门诊充值",
      to: {
        name: "MemberList",
        query: {
          funKey: "MZCZ",
          title: "门诊充值",
          hideBack: true,
          prompt: "你要为谁充值",
          to: {
            name: "SelectCardPage",
            query: {
              funKey: "MZCZ",
              title: "门诊充值",
              to: {
                name: "PayForm"
              }
            }
          }
  
        },
      }
    }
  
  };
  
  
  const loadindTexts = {
    request: "数据获取中",
    pageSwitch: "加载中"
  };
  
  
  
  
  
  const QR_Type = "qr";
  const Bar_Type = "bar";
  
  const qbrCode = {
    getKeyForId: function (qbrID) {
      return this.findKey(function (propValue, propkey, index) {
  
        switch (propkey) {
          case "getKeyForId": {
            return false;
          }
          case "getPropValueForId": {
            return false;
          }
  
          default: {
            return propValue == qbrID;
          }
        }
  
      });
    },
  
    getPropValueForId: function (qbrID) {
      let key = this.getKeyForId(qbrID);
      return this[key];
    },
  
  
    QR: {  // QR二维码
      type: QR_Type,
      id: 0,
    },
    EAN13: { //EAN一维条形码码标准版
      type: Bar_Type,
      id: 1,
    },
  
  
    EAN8: { //ENA一维条形码简版
      type: Bar_Type,
      id: 2,
    },
  
  
    AZTEC: { //Aztec二维码
      type: QR_Type,
      id: 3,
    },
  
  
    DATAMATRIX: { //Data Matrix二维码
      type: QR_Type,
      id: 4,
    },
  
    UPCA: { //UPC码标准版
      type: Bar_Type,
      id: 5,
    },
  
  
    UPCE: { //UPC码缩短版
      type: Bar_Type,
      id: 6,
    },
  
  
    CODABAR: { //Codabar码
      type: Bar_Type,
      id: 7,
    },
  
  
    CODE39: { //Code39一维条形码
      type: Bar_Type,
      id: 8,
    },
  
  
    CODE93: { //Code93码
      type: Bar_Type,
      id: 9,
    },
  
  
    CODE128: { //Code128码
      type: Bar_Type,
      id: 10,
    },
  
  
    ITF: { //ITF码
      type: Bar_Type,
      id: 11,
    },
  
  
    MAXICODE: { //MaxiCode二维码
      type: QR_Type,
      id: 12,
    },
  
  
    PDF417: { //PDF 417码
      type: Bar_Type,
      id: 13,
    },
  
  
    RSS14: { //RSS 14组合码
      type: Bar_Type,
      id: 14,
    },
  
    RSSEXPANDED: { //扩展式RSS组合码
      type: Bar_Type,
      id: 15,
    },
  
  };
  
  
  // /**
  //  * 设置或者检查所有路由位置对象的属性名数组
  //  */
  // const locatPropsOfRouteData = ["to", "from", "back"];
  
  
  // /**
  //  * 设置特殊的路由位置
  //  * 目前用于：
  //  * - App 中在特殊位置时按设备的返回按钮会使App退出
  //  */
  // const specialLocats = [
  //   {name:"Home"}
  // ] ;
  
  
  
  
  
  //导航条样式
  const navBarStyles = {
    backgroundColor: "#35495e",//导航栏背景色
    titleColor: "#FFFFFF",//标题颜色
    titleSize: "18px"
  } ;
  
  
  
  
  
  window.shareData = {
    navBarStyles,
    payMethodMap,
    funLocatFlows,
    loadindTexts,
    qbrCode,
    QR_Type,
    Bar_Type
  } ;
  